package com.ftf.tp.blog.infrastructure.mapper.pos;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.Date;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 文章收藏表
 *
 * @author tanghao
 * @date 2022/6/24
 */
@ApiModel(value = "文章收藏表")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "article_collection")
public class ArticleCollectionPO {
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.INPUT)
    @ApiModelProperty(value = "主键")
    private Long id;

    /**
     * 收藏人id
     */
    @TableField(value = "user_id")
    @ApiModelProperty(value = "收藏人id")
    private Long userId;

    /**
     * 收藏人名字
     */
    @TableField(value = "user_name")
    @ApiModelProperty(value = "收藏人名字")
    private String userName;

    /**
     * 被收藏文章id
     */
    @TableField(value = "article_id")
    @ApiModelProperty(value = "被收藏文章id")
    private Long articleId;

    /**
     * 被收藏文章标题
     */
    @TableField(value = "article_title")
    @ApiModelProperty(value = "被收藏文章标题")
    private String articleTitle;

    /**
     * 收藏夹id
     */
    @TableField(value = "collection_folder_id")
    @ApiModelProperty(value = "收藏夹id")
    private Long collectionFolderId;

    /**
     * 乐观锁
     */
    @TableField(value = "revision")
    @ApiModelProperty(value = "乐观锁")
    private Integer revision;

    /**
     * 创建时间
     */
    @TableField(value = "created_time")
    @ApiModelProperty(value = "创建时间")
    private Date createdTime;

    /**
     * 更新时间
     */
    @TableField(value = "updated_time")
    @ApiModelProperty(value = "更新时间")
    private Date updatedTime;
}